package com.yuxue.petlog.logger;

import com.yuxue.petlog.payment.Balance;
import com.yuxue.petlog.payment.Cash;
import com.yuxue.petlog.payment.Coupon;
import com.yuxue.petlog.payment.Points;
import com.yuxue.petlog.product.Product;
import com.yuxue.petlog.user.User;
import com.yuxue.petlog.webpage.Page;
//  日志管理器
public class LogManager {
    public static void main(String[] args) {
        Logger[] logs = new Logger[] {
                new Logger(new User("小明"), new Page("点餐页面"), new Product("两套摄影套餐"), new Balance(), 30),
                new Logger(new User("小红"), new Page("商城页面"), new Product("一袋猫粮"), new Cash(), 50),
                new Logger(new User("小花"), new Page("积分兑换页面"), new Product("一次 宠物养护服务"), new Points(), 40),
//                new Logger(new User("***"), new Page("积分兑换页面"), new Product("一次 宠物养护服务"), new Points(), 10),
//                new Logger(new User("+++"), new Page("积分兑换页面"), new Product("一次 宠物养护服务"), new Points(), 500),
                new Logger(new User("小黑"), new Page("积分兑换页面"), new Product("三箱 猫粮"), new Points(), 300),
                new Logger(new User("小黄"), new Page("优惠券页面"), new Product("一次 体验套餐"), new Coupon(), 2)
        };

        StringBuilder sb = new StringBuilder();
        for (Logger log : logs) {
            sb.append(log.getLogMessage()).append("\n");
        }
        System.out.println(sb);
    }
}